home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 45
/
Aminet 45 (2001)(GTI - Schatztruhe)[!][Oct 2001].iso
/
Aminet
/
game
/
role
/
ldmud-3.2-bin.lha
/
mud
/
doc
/
efun
/
query_verb
< prev
next >
Wrap
Text File
|
2001-04-06
|
926b
|
30 lines
SYNOPSIS
string query_verb(void)
DESCRIPTION
Give the name of the current command, or 0 if not executing
from a command. This allows add_action() of several commands
to the same function. query_verb() returns 0 when invoked by a
function which was started by a call_out or the heart beat.
Also when a user logs in query_verb() returns 0.
The string returned is always the first word from the line
input by the player, up to but not including the first space
(or lineend).
EXAMPLE
void init() {
...
add_action("sing","sing");
...
}
int sing(string str) {
write("Your command was:"+query_verb()+(str ? str : "")+"\n");
return 1;
}
When ever you type "sing ..." you get "Your command was: sing ...".
SEE ALSO
add_action(E), query_command(E)